//
//  ZDBNewsInfoViewController.m
//  ZDB
//
//  Created by Kk on 2020/3/31.
//  Copyright © 2020 ZDB. All rights reserved.
//

#import "ZDBNewsInfoViewController.h"

@interface ZDBNewsInfoViewController ()
@property (nonatomic, strong) UILabel * titlelable;
@property (nonatomic, strong) UILabel * dataTimelable;
@property (nonatomic, strong) UITextView * textview;
@end
@implementation ZDBNewsInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.titlelable];
    [self.view addSubview:self.dataTimelable];
    [self.view addSubview:self.textview];
}
- (UILabel *)titlelable
{
    if (!_titlelable) {
        _titlelable = [[UILabel alloc] initWithFrame:CGRectMake(20, RealValue_H(22), UIScreenWidth-40, 0)];
        _titlelable.textColor = MAINTITLECOLOR;
        _titlelable.font = AutoBoldFont(15);
        _titlelable.text = _model.title;
        _titlelable.numberOfLines = 0;
        [_titlelable sizeToFit];
        _titlelable.width = UIScreenWidth-40;
    }
    return _titlelable;
}
- (UILabel *)dataTimelable
{
    if (!_dataTimelable) {
        _dataTimelable = [[UILabel alloc] initWithFrame:CGRectMake(20,_titlelable.bottom + RealValue_H(38/2), UIScreenWidth-40, 15)];
        _dataTimelable.textColor = MAINTITLECOLOR;
        _dataTimelable.font = AutoFont(12);
        _dataTimelable.text = [ZBDUnit getOtherTimeStrWithString:_model.createTime];
       
    }
    return _dataTimelable;
}
- (UITextView *)textview
{
    if (!_textview) {
        _textview = [[UITextView alloc] initWithFrame:CGRectMake(_titlelable.mj_x-4, _dataTimelable.bottom , _dataTimelable.width, UIScreenHeight - kStatusBarAndNavigationBarHeight -_dataTimelable.mj_y -15)];
        _textview.editable = NO;
        _textview.showsVerticalScrollIndicator = NO;
        _textview.backgroundColor = self.view.backgroundColor;
        _textview.text = _model.content;
    }
    return _textview;
}

@end
